/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainPort1.java
 *
 * Created on 21/11/2011, 16:45:38
 */
package threeds.GUI;

/**
 *
 * @author Bernardo
 */
public class MainPort extends javax.swing.JFrame {

    /** Creates new form MainPort1 */
    public MainPort() {
        super("ThreeDs - Database Data Dictionary");
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        PanelC = new javax.swing.JPanel();
        LinhaLabel = new javax.swing.Box.Filler(new java.awt.Dimension(700, 2), new java.awt.Dimension(700, 5), new java.awt.Dimension(500, 32767));
        ThreeDsLabel = new javax.swing.JLabel();
        DatabaseLabel = new javax.swing.JLabel();
        MenuSuperior = new javax.swing.JMenuBar();
        Arquivo = new javax.swing.JMenu();
        homeMenu = new javax.swing.JMenuItem();
        esquemasMenu = new javax.swing.JMenuItem();
        projetistasMenu = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        tabelaMenu = new javax.swing.JMenuItem();
        atributosMenu = new javax.swing.JMenuItem();
        Sair = new javax.swing.JMenuItem();
        Editar = new javax.swing.JMenu();
        Ajuda = new javax.swing.JMenu();
        Sobre = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setMinimumSize(new java.awt.Dimension(1340, 640));

        PanelC.setBackground(new java.awt.Color(39, 232, 32));

        LinhaLabel.setBackground(new java.awt.Color(204, 204, 204));
        LinhaLabel.setOpaque(true);

        ThreeDsLabel.setFont(new java.awt.Font("Times New Roman", 1, 56));
        ThreeDsLabel.setText("ThreeDs");

        DatabaseLabel.setFont(new java.awt.Font("Times New Roman", 2, 36));
        DatabaseLabel.setText("Database Data Dictionary");

        javax.swing.GroupLayout PanelCLayout = new javax.swing.GroupLayout(PanelC);
        PanelC.setLayout(PanelCLayout);
        PanelCLayout.setHorizontalGroup(
            PanelCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PanelCLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PanelCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(ThreeDsLabel)
                    .addGroup(PanelCLayout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(PanelCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(PanelCLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(DatabaseLabel))
                            .addComponent(LinhaLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(574, Short.MAX_VALUE))
        );
        PanelCLayout.setVerticalGroup(
            PanelCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PanelCLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(ThreeDsLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(LinhaLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(DatabaseLabel)
                .addContainerGap(469, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(PanelC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(PanelC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        MenuSuperior.setFocusTraversalPolicyProvider(true);

        Arquivo.setText("Arquivo");

        homeMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1, java.awt.event.InputEvent.CTRL_MASK));
        homeMenu.setText("Home");
        homeMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                homeMenuActionPerformed(evt);
            }
        });
        Arquivo.add(homeMenu);

        esquemasMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2, java.awt.event.InputEvent.CTRL_MASK));
        esquemasMenu.setText("Esquemas");
        esquemasMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                esquemasMenuActionPerformed(evt);
            }
        });
        Arquivo.add(esquemasMenu);

        projetistasMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3, java.awt.event.InputEvent.CTRL_MASK));
        projetistasMenu.setText("Projetistas");
        projetistasMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projetistasMenuActionPerformed(evt);
            }
        });
        Arquivo.add(projetistasMenu);

        jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem4.setText("Ajuda");
        Arquivo.add(jMenuItem4);

        tabelaMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5, java.awt.event.InputEvent.CTRL_MASK));
        tabelaMenu.setText("Tabela");
        tabelaMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tabelaMenuActionPerformed(evt);
            }
        });
        Arquivo.add(tabelaMenu);

        atributosMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6, java.awt.event.InputEvent.CTRL_MASK));
        atributosMenu.setText("Atributos");
        Arquivo.add(atributosMenu);

        Sair.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        Sair.setText("Sair");
        Sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SairActionPerformed(evt);
            }
        });
        Arquivo.add(Sair);

        MenuSuperior.add(Arquivo);

        Editar.setText("Editar");
        MenuSuperior.add(Editar);

        Ajuda.setText("Ajuda");

        Sobre.setText("Sobre");
        Sobre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SobreActionPerformed(evt);
            }
        });
        Ajuda.add(Sobre);

        MenuSuperior.add(Ajuda);

        setJMenuBar(MenuSuperior);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1314, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(16, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 637, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(14, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void SairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SairActionPerformed

    }//GEN-LAST:event_SairActionPerformed

    private void SobreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SobreActionPerformed

    }//GEN-LAST:event_SobreActionPerformed

    private void homeMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_homeMenuActionPerformed
        this.dispose();
        HomePort hp = new HomePort();
        hp.setVisible(true);
    }//GEN-LAST:event_homeMenuActionPerformed

    private void esquemasMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_esquemasMenuActionPerformed
        EsquemasPort ep = new EsquemasPort();
        ep.setVisible(true);
        ep.setBounds(50, 150, 740, 430);
        PanelC.add(ep);
    }//GEN-LAST:event_esquemasMenuActionPerformed

    private void projetistasMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projetistasMenuActionPerformed
        ProjetistasPort pp = new ProjetistasPort();
        pp.setVisible(true);
        pp.setBounds(50, 150, 740, 430);
        PanelC.add(pp);
    }//GEN-LAST:event_projetistasMenuActionPerformed

    private void tabelaMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tabelaMenuActionPerformed
        TabelaPort tp = new TabelaPort();
        tp.setVisible(true);
        tp.setBounds(50, 150, 740, 430);
        PanelC.add(tp);
    }//GEN-LAST:event_tabelaMenuActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainPort.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainPort.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainPort.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainPort.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new MainPort().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu Ajuda;
    private javax.swing.JMenu Arquivo;
    private javax.swing.JLabel DatabaseLabel;
    private javax.swing.JMenu Editar;
    private javax.swing.Box.Filler LinhaLabel;
    private javax.swing.JMenuBar MenuSuperior;
    protected javax.swing.JPanel PanelC;
    private javax.swing.JMenuItem Sair;
    private javax.swing.JMenuItem Sobre;
    private javax.swing.JLabel ThreeDsLabel;
    private javax.swing.JMenuItem atributosMenu;
    private javax.swing.JMenuItem esquemasMenu;
    private javax.swing.JMenuItem homeMenu;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JMenuItem projetistasMenu;
    private javax.swing.JMenuItem tabelaMenu;
    // End of variables declaration//GEN-END:variables
    public void Home(){
        this.dispose();
        HomePort lp = new HomePort();
        lp.setVisible(true);
    }
    
    public void Esquemas(){
        EsquemasPort ep = new EsquemasPort();
        PanelC.add(ep);
        ep.setVisible(true);
        ep.setBounds(300, 200, 1000, 400);
    }
    
    public void Projetistas(){
        ProjetistasPort pp = new ProjetistasPort();
        PanelC.add(pp);
        pp.setBounds(310, 210, 1000, 400);
        pp.setVisible(true);
    }
    
    public void Ajuda(){
        AjudaPort ap = new AjudaPort();
        PanelC.add(ap);
        ap.setBounds(320, 220, 1000, 400);
        ap.setVisible(true);
    }
}
